package utils

import "encoding/json"

func Clone(b []byte) []byte {
	c := make([]byte, len(b))
	copy(c, b)
	return c
}

func ToBytes(v interface{}) []byte {
	b, _ := json.Marshal(v)
	return b
}
